﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KingSite.SyncDB.Core.Entity {
    /// <summary>
    /// 同步作业信息
    /// </summary>
    public class SyncJobInfo {
        /// <summary>
        /// 任务名称
        /// </summary>
        public string JobName { get { return string.Format(" {0}.{1} --> {2}.{3} ", this.SdbName, this.STableName, this.DdbName, this.DTableName); } }
        /// <summary>
        /// 源DbId
        /// </summary>
        public int SdbId { get; set; }
        /// <summary>
        /// 源数据库名 
        /// </summary>
        public string SdbName { get; set; }
        /// <summary>
        /// 源表Id
        /// </summary>
        public int StId { get; set; }
        /// <summary>
        /// 源表名
        /// </summary>
        public string STableName { get; set; }
        /// <summary>
        /// 目标DbId
        /// </summary>
        public int DdbId { get; set; }
        /// <summary>
        /// 目标数据库名 
        /// </summary>
        public string DdbName { get; set; }
        /// <summary>
        /// 目标表Id
        /// </summary>
        public int DtId { get; set; }
        /// <summary>
        /// 目标表名
        /// </summary>
        public string DTableName { get; set; }
        /// <summary>
        /// 源表的LastTimeStamp
        /// </summary>
        public string SLastTimeStamp { get; set; }
        /// <summary>
        /// 源数据库连接字符串
        /// </summary>
        public string SDbconnstring { get; set; }
        /// <summary>
        /// 目标数据库连接字符串
        /// </summary>
        public string DDbconnstring { get; set; }
        /// <summary>
        /// 源db类型Id
        /// </summary>
        public int SDbTypeId { get; set; }
        /// <summary>
        /// 源db类型名称
        /// </summary>
        public string SDbTypeName { get; set; }
        /// <summary>
        /// 目标db类型Id
        /// </summary>
        public int DDbTypeId { get; set; }
        /// <summary>
        /// 目标db类型名称
        /// </summary>
        public string DDbTypeName { get; set; }

        /// <summary>
        /// 是否同步Insert记录
        /// </summary>
        public bool IsSyncInsert { get; set; }
        /// <summary>
        /// 是否同步Update记录
        /// </summary>
        public bool IsSyncUpdate { get; set; }
        /// <summary>
        /// 是否同步Delete记录
        /// </summary>
        public bool IsSyncDelete { get; set; }
        /// <summary>
        /// 同步等级，数字越大等级越高
        /// </summary>
        public int SyncLevel { get; set; }


    }
}
